home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-11-11 | 73.5 KB | 2,016 lines |
-
- From: sgi-faq@viz.tamu.edu (The SGI FAQ group)
- Newsgroups: comp.sys.sgi.misc,comp.answers,news.answers
- Subject: SGI graphics Frequently Asked Questions (FAQ)
- Supersedes: <graphics_786697207@viz.tamu.edu>
- Followup-To: comp.sys.sgi.misc
- Date: 20 Dec 1994 06:57:02 GMT
- Organization: Visualization Lab, Texas A&M University
- Lines: 1997
- Approved: news-answers-request@mit.edu
- Expires: 17 Jan 1995 07:00:07 GMT
- Message-ID: <graphics_787906807@viz.tamu.edu>
- Reply-To: sgi-faq@viz.tamu.edu (The SGI FAQ group)
- NNTP-Posting-Host: viz.tamu.edu
- Originator: sgi-faq@viz
-
- Archive-name: sgi/faq/graphics
- Last-modified: Sat Dec 17 12:14:13 CST 1994
-
- SGI graphics Frequently Asked Questions (FAQ)
-
- This is one of the Silicon Graphics FAQ series, which consists of:
-
- SGI admin FAQ - IRIX system administration
- SGI apps FAQ - Applications and miscellaneous programming
- SGI audio FAQ - Audio applications and programming
- SGI graphics FAQ - Graphics and user environment customization
- SGI hardware FAQ - Hardware
- SGI impressario FAQ - IRIS Impressario
- SGI inventor FAQ - IRIS Inventor
- SGI misc FAQ - Introduction & miscellaneous information
- SGI movie FAQ - Movies
- SGI performer FAQ - IRIS Performer
- SGI pointer FAQ - Pointer to the other FAQs
-
- Read the misc FAQ for information about the FAQs themselves. Each FAQ
- is posted to comp.sys.sgi.misc and to the news.answers and comp.answers
- newsgroups (whose purpose is to store FAQs) twice per month. If you
- can't find one of the FAQs with your news program, you can get it by
- anonymous FTP from one of these sites:
-
- viz.tamu.edu:/pub/sgi/faq/
- rtfm.mit.edu:/pub/usenet/news.answers/sgi/faq/
- ftp.uu.net:/usenet/news.answers/sgi/faq/
-
- Note that rtfm.mit.edu is home to many other FAQs and informational
- documents, and is a good place to look if you can't find an answer here.
- If you can't use FTP, send mail to mail-server@rtfm.mit.edu with the
- word 'help' on a line by itself in the text, and it will send you a
- document describing how to get files from rtfm.mit.edu by mail. Send the
- command 'send usenet/news.answers/sgi/faq/misc' to get the SGI misc FAQ,
- and similarly for the other FAQs. Finally, the FAQs are on the World
- Wide Web at
-
- http://www.cis.ohio-state.edu/hypertext/faq/usenet/sgi/top.html
-
- The SGI FAQs are freely distributable and we encourage wide circulation.
- You MUST keep the FAQs intact, including headers and this notice. The
- contents are accurate as far as we know, but the usual disclaimers
- apply. (In particular, copies of the SGI FAQs published on paper or
- CD-ROM are certain to be out of date!) Please send additions and changes
- to sgi-faq@viz.tamu.edu.
-
- Topics covered in this FAQ:
- ---------------------------
- -1- DISPLAYS AND DGL
- -2- How can I run a program on one machine and display it on another?
- -3- Does the DISPLAY environment variable work for GL applications?
- -4- Why doesn't the DISPLAY environment variable seem to work?
- -5- Why do I get DGL errors when I try to run a GL program?
- -6- CUSTOMIZING
- -7- What tools does SGI provide to help with the customization
- process?
- -8- What are the important login and resource files for IRIX 4.0.x?
- -9- What is the sequence of events that occur at login time in IRIX
- 4.0.x?
- -10- What is the difference between .xsession and .sgisession in IRIX
- 4.0.x?
- -11- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
- environment variable I set in my shell's startup files in IRIX
- 4.0.x?
- -12- How can I save my screen layout in IRIX 4.0.x?
- -13- How can I turn off the IRIX 5.2 Magic user environment?
- -14- Where is the default value of PATH set?
- -15- Why can't I log in after copying /usr/lib/X11/xdm/Xsession to
- .xsession?
- -16- How can I find out what fonts are available?
- -17- How can I use the Alt key as a Meta key in an xwsh window?
- -18- How can I configure my keyboard like a VT100?
- -19- RESOURCES
- -20- What are resources?
- -21- How can I set resources?
- -22- How can I use resources to run the same program twice with
- different attributes?
- -23- Does the GL recognize resources?
- -24- How can I know what resources I can set for an application?
- -25- What is a good approach to take in looking for resources?
- -26- What is the precedence for resource files?
- -27- Why do long resources cause X to crash mysteriously in IRIX 5.2?
- -28- 4DWM
- -29- Where can I learn more about the Window Manager?
- -30- What files affect the window manager and what is their
- relationship to each other?
- -31- Do I need my own .4Dwmrc file?
- -32- Can I run a different window manager?
- -33- How can I choose a different window manager as the default?
- -34- How can I recover from a failed window manager customization
- attempt?
- -35- Why is an extra 4Dwm burning CPU in IRIX 4.0.x?
- -36- Why doesn't the window manager's "Log Out" routine work in IRIX
- 4.0.5?
- -37- ADMINISTRATION
- -38- How can I log into pandora/clogin without bringing up graphics?
- -39- How can I restart the console?
- -40- How can I start and stop the graphics system?
- -41- How can I kill the X server without logging in or rebooting?
- -42- How can I run 'xinit' manually, rather than automatically from
- 'xdm'?
- -43- How can I start X on a remote host with no users logged in?
- -44- IMAGE FILES
- -45- How can I convert images to and from other formats?
- -46- What is the format of SGI's RGB files?
- -47- How can I compress RGB bitmaps?
- -48- How can I make a screen dump?
- -49- PROGRAMMING
- -50- Can I use 4Dgifts code in my application?
- -51- What does ERR_WMANIPC mean?
- -52- How can I translate screen (x,y) coords into world (x,y,z)
- coords?
- -53- How can I translate world (x,y,z) coords into screen (x,y)
- coords?
- -54- Why does nothing happen when I call mapcolor(index, R, G, B)?
- -55- What's wrong with blink() in IRIX 4.0.x?
- -56- Why can't 'cc' find some standard Xwindows functions?
- -57- Where is the library /usr/lib/libgl_s.a for my R4000 Indigo
- running IRIX 4.0.5F?
- -58- What is a GL widget?
- -59- I'm using the GlxMDraw widget and it doesn't seem that colors are
- being installed correctly. Overlays in the GlxMDraw widget are
- displayed in red and gray instead of the colors I specify.
- What's wrong?
- -60- Is there a way to switch between single and double buffering
- within a GL widget on the fly?
- -61- Why doesn't my X server use backing store? How can I turn it on?
- -62- What is "/dev/tport" used for?
- -63- BUGS AND PROBLEMS
- -64- Why do I get a "Broken Pipe" error when I close an X client
- window?
- -65- What do the errors in my 'xdm-errors' file mean?
- -66- Why doesn't SGI's xlock lock my screen?
- -67- Sun XView applications like "mailtool" hang my X server in IRIX
- 4.0.5. They come up fine, but when I click on them the server
- freezes.
- -68- Why can't I log into Pandora in IRIX 4.0.1?
- -69- Pandora won't come up, and /usr/adm/SYSLOG says "helvetica font
- missing"
- -70- Why does the X server sometimes abort when I log out in IRIX
- 5.0.1 and IRIX 5.1?
- -71- After running a few programs, the colors change as the cursor
- moves. The colors are usually all wrong in other windows.
- -72- How can I make my X Server use a 12-bit PseudoColor, 12-bit
- TrueColor or 24-bit TrueColor visual by default?
- -73- When I try to run UIM/X uxserverd, I get an error message saying,
- "license file has been modified, cannot start the UIM/X license
- server".
- -74- MISCELLANEOUS
- -75- What books about the X Window System and OSF/Motif do you
- recommend?
- -76- Does the IRIX 5.2 Magic user environment display on an X
- terminal?
- -77- What about OpenGL?
- -78- Which SGI machines can run OpenGL now? Which will in the future?
- + -79- What's this about a copyright dispute over virtual desks in
- Indigo Magic?
-
- ----------------------------------------------------------------------
-
- Subject: -1- DISPLAYS AND DGL
- Date: + 15 May 94 00:00:01 EST
-
- This section discusses how to use remote displays.
-
- ------------------------------
-
- Subject: -2- How can I run a program on one machine and display it on
- another?
- Date: 07 May 93 00:00:01 EST
-
- Use the DISPLAY environment variable to specify the remote host on
- which you want the X client to be displayed, then run the
- application.
-
- To specify the remote host,
-
- setenv DISPLAY <destination>:0
-
- where <destination> is the name or IP address of the remote host. To
- specify the local host (console),
-
- setenv DISPLAY :0
-
- ------------------------------
-
- Subject: -3- Does the DISPLAY environment variable work for GL
- applications?
- Date: 07 May 93 00:00:01 EST
-
- Yes: IRIX 4.0.x and later uses the Distributed Graphics Library (DGL)
- by default. DGL applications use the DISPLAY environment variable
- just as do ordinary X applications.
-
- ------------------------------
-
- Subject: -4- Why doesn't the DISPLAY environment variable seem to
- work?
- Date: 07 May 93 00:00:01 EST
-
- First, make sure your DISPLAY variable is syntactically correct. For
- example, to display applications on a machine named "enterprise",
- whose IP address is 123.45.678.90, DISPLAY should be set to
- "enterprise:0" or "123.45.678.90:0".
-
- Next, try to "ping" the machine to which your DISPLAY variable is
- set. If this does not work, you have either specified an invalid
- hostname, the host is down, or you are having network problems.
-
- If you see messages like "permission denied" or "can't connect to
- server", you have a permission problem. Do 'xhost +yourmachine' on
- the remote machine to give 'yourmachine' access to the remote
- machine's display. (Note that 'xhost' is inactive by default on
- SGIs.)
-
- If you're using NIS (YP), make sure the client is linked with
- "-lsun".
-
- For more information see Chapter 3 of the X Window System User's
- Guide.
-
- ------------------------------
-
- Subject: -5- Why do I get DGL errors when I try to run a GL program?
- Date: 20 Feb 94 00:00:01 EST
-
- - There may be a problem with the DISPLAY variable or Xwindows
- permissions. See the previous question.
-
- - You may be trying to display on a non-SGI machine which doesn't
- have GL/DGL. (Most don't, yet.) Presently the only way around this
- is to buy a third-party GL emulator for the non-SGI machine.
-
- - DGL may be disabled in /etc/services and/or /etc/inetd.conf. The
- former file should have a line reading
-
- sgi-dgl 5232/tcp
-
- and the latter should have a line reading
-
- sgi-dgl stream tcp nowait root /usr/etc/dgld dgld -IM -tDGLTSOCKET
-
- If either is commented out, remove the comment.
-
- - You may be trying to display on a machine with a much older version
- of IRIX. Try another machine with a newer IRIX.
-
- An article in the Jan/Feb 93 Pipeline describes the above in great
- detail.
-
- ------------------------------
-
- Subject: -6- CUSTOMIZING
- Date: 15 May 94 00:00:01 EST
-
- This section discusses ways to customize your environment, both with
- and without graphics. The next two sections go into depth on
- customizing Xwindows resources and the 4Dwm.
-
- ------------------------------
-
- Subject: -7- What tools does SGI provide to help with the
- customization process?
- Date: 05 Jul 94 00:00:01 EST
-
- Here are some good places to look in IRIX 4.0.x:
-
- - The Customization rollover menu in the Toolchest.
- - The manpages for xfontsel, xlsfonts, xwininfo, xdpyinfo, xprop,
- appres, listres, and xrdb.
- - The "WorkSpace User's Guide".
- - The example files in /usr/tutor/Customize.
-
- In IRIX 5.x, take the systemtour and keep your eyes open.
-
- ------------------------------
-
- Subject: -8- What are the important login and resource files for IRIX
- 4.0.x?
- Date: 07 May 93 00:00:01 EST
-
- The following three file groupings indicate where files that affect
- your login session reside.
-
- 1) /usr/lib/X11/* - This is THE starting place. Here you find the
- system default bindings for Motif, 4Dwm, and the Toolchest. The xdm
- directory lives here as well as the app-defaults directory. xdm
- controls the session management. Many application defaults are set in
- the app-defaults directory.
-
- 2) $HOME/[.Xdefaults, .4Dwmrc, .chestrc, .xsession, .sgisession] Here
- you find the files that control your system set-up. You create these
- files; they don't exist when you first log in.
-
- 3) /usr/bin/X11 - This is where the binaries live. It makes life nice
- to include this directory in your path.
-
- ------------------------------
-
- Subject: -9- What is the sequence of events that occur at login time
- in IRIX 4.0.x?
- Date: 10 Dec 93 00:00:01 EST
-
- This is a bare bones synopsis of the events that occur when you log
- in to the console via xdm (the default method of logging in) under
- IRIX 4.0.x and, with the desktop *disabled*, IRIX 5.x.
-
- 1) Provide a "failsafe" (nographics) login if required/requested.
- 2) Exec $HOME/.xsession if it exists. If it exists, the remaining
- steps should normally be included in the users .xsession file
- as well.
- 3) Load $HOME/.Xresources if it exists.
- 4) Set XUSERFILESEARCHPATH.
- 5) Incorporate a "shell" environment into the "session".
- (man userenv)
- 6) Set the root background and cursor.
- 7) Disable display access control (xhost +). (man xhost)
- 8) Start 4Dwm.
- 9) Wait for 4Dwm to come up.
- 10) Start the console.
- 11) Execute $HOME/.sgisession if it exists.
- 12) Start WorkSpace if the user wants it.
- 13) Put a Toolchest on each screen.
- 14) Exec the "reaper". (man reaper / endsession)
-
- ------------------------------
-
- Subject: -10- What is the difference between .xsession and .sgisession
- in IRIX 4.0.x?
- Date: 07 May 93 00:00:01 EST
-
- The system Xsession file (/usr/lib/X11/xdm/Xsession or
- Xsession-remote) starts up a number of important things when you log
- in, eg. 4Dwm, toolchest, loads resources, sets your
- XUSERFILESEARCHPATH, sets your root background, etc.
-
- One of the last things it does is look in your home directory for a
- .sgisession file. This allows you to start additional programs at
- login time. This is the file that you would use to start a mailbox,
- additional window, a calendar, etc.
-
- ADVANTAGES OF $HOME/.sgisession :
-
- 1) You don't need to read through yet another system file to see
- what you need or don't need.
-
- DISADVANTAGES OF $HOME/.sgisession :
-
- 1) You cannot override ALL of the defaults set for you. Some
- things you can't change from a .sgisession file:
-
- A) You can't start a different window manager.
- B) You can't change the way the console starts.
- C) You can't change toolchest output redirection to
- the console.
-
- 2) Users of other vendors' equipment are used to seeing a
- .xsession file.
-
- After checking for a "failsafe" (ie. no graphics) login, one of the
- first things that /usr/lib/X11/xdm/Xsession does is check for
- $HOME/.xsession. If it exists, Xsession execs your .xsession file.
- This means that if you are REALLY sure you know what you are doing,
- you can log in with a different window manager, xterm as a console,
- or xwsh not already iconified, etc. You can also turn off the
- toolchest output redirection, and start anything else you might have
- done in $HOME/.sgisession. There is a discussion on xsession files in
- volume 3 of the O'Reilly series.
-
- ------------------------------
-
- Subject: -11- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
- environment variable I set in my shell's startup files
- in IRIX 4.0.x?
- Date: 30 Apr 94 00:00:01 EST
-
- The script /usr/lib/X11/xdm/Xsession (or, if you have one, your own
- ~/.xsession) runs when you log in and starts your window manager
- (4Dwm), Workspace, etc. To give these programs a copy of the
- environment you define in your shell's startup files, Xsession first
- runs 'userenv', which runs your shell just to see what environment
- variables your shell's startup files set and puts them into
- Xsession's environment. Later on Xsession runs 4Dwm, Workspace, etc.
- and they inherit Xsession's environment including the environment
- variables which 'userenv' got from your shell's startup files.
-
- However, 'userenv' objects to 1) errors in your shell startup files,
- 2) commands which print output to the terminal and 3) commands like
- 'stty' and 'tset', which expect to be connected to a terminal. Any
- of these may cause 'userenv' to give up completely, so that Xsession,
- 4Dwm, Workspace, etc. do not get any of your shell's enviroment.
-
- To get 'userenv' to work, you must 1) make sure that your shell
- startup files are error-free and 2) protect 'userenv' from commands
- which print output or expect to be connected to a terminal by testing
- for the ENVONLY environment variable before running them. (See the
- userenv(1) manpage.) You might try disabling your shell startup files
- (or parts thereof) one by one to narrow down which is causing the
- problem. Be sure to check both personal and system-wide shell
- startup files! See your shell's manpage for a complete list.
-
- Note that each terminal window (aka 'winterm', 'xwsh' or 'xterm')
- runs a fresh copy of your shell, so it has a second chance to set
- your environment variables. Your shell is now connected to a terminal
- and 'userenv' isn't involved, so none of the above problems apply.
- The environment in a terminal window will appear correct, and
- programs started from a window (e.g. by typing 'workspace' to start
- Workspace) will inherit the environment properly. Furthermore,
- 'userenv' often appears to work when run inside a terminal window,
- even when it does not work when run from Xsession. This is all fine,
- but it doesn't help when you log in. One right way to see if
- 'userenv' is working when it should is to add the line 'env >
- $HOME/test-userenv' to Xsession after the line that runs 'userenv',
- log in and examine the file it creates.
-
- 'bash' users take note: 'bash' has particular problems with
- 'userenv', and there is a special version of 'userenv' which works
- with 'bash' at
- viz.tamu.edu:/pub/sgi/software/userenv/userenv.tar.gz.
-
- ------------------------------
-
- Subject: -12- How can I save my screen layout in IRIX 4.0.x?
- Date: 07 May 93 00:00:01 EST
-
- Not very easily. You must run "xwininfo" to find the X and Y
- position of each window, then use that information to customize your
- .sgisession or .xsession files.
-
- For more information see Chapter 3 of the X Window System User's
- Guide, (Vol. 3 of the O'Reilly series)
-
- There are two tools that may help: 'xtoolplaces', which was posted to
- volume 14 of comp.sources.x
- (ftp.uu.net:/usenet/comp.sources.x/volume14/xtoolplaces/), and David
- Hinds' 'xscript', which is at cb-iris.stanford.edu:/pub/.
-
- ------------------------------
-
- Subject: -13- How can I turn off the IRIX 5.2 Magic user environment?
- Date: 18 Aug 94 00:00:01 EST
-
- Mark Andrews <mark@alias.com> says:
- You can disable the Indigo Magic environment in two ways:
-
- 1) If you wish to disable it for all users on the machine:
-
- chkconfig desktop off
-
- 2) If you wish to disable it for a specific user, do
-
- touch ~<username>/.disableDesktop
-
- You may also have to remove the ~/.desktop-<hostname> directory as
- well as 4Dwm looks in there for a 4Dwmsession file which it uses
- for a guide to redisplay windows left open from the last session.
-
- Method 2 works ONLY if you have the original IRIX 5.2 xdm Xsession
- file, which contains the following code chunk:
-
- if /etc/chkconfig desktop ;
- then
- if [ -x $0.dt -a \! -f $HOME/.disableDesktop ]
- then
- exec $0.dt $*
- fi
- fi
-
- If you only want to turn off the file manager, create the file
- ~/.desktop-<hostname>/nodesktop.
-
- Whether you disable the entire desktop or just the file manager, you
- may also want to set one or more of these resources
-
- 4DWm*SG_autoSave: false
- 4Dwm*SG_manageSession: false
- 4Dwm*SG_useBackgrounds: false
-
- which are explained in the 4Dwm(1) manpage. See also the desktop_eoe
- release notes.
-
- ------------------------------
-
- Subject: -14- Where is the default value of PATH set?
- Date: 10 Dec 93 00:00:01 EST
-
- Every program which allows a user to log in (telnet, rlogin, pandora,
- etc.) can specify PATH. Shells may as well if it isn't already set.
- There are many slightly different default values, and relying on them
- is a good way to get confused. The only reliable method is to set
- PATH in your shell's startup files. These are different for each
- shell, and are described in each shell's manpage. Beware of 'ksh',
- which has an internal, invisible default path ('/bin:/usr/bin') which
- it uses when PATH is not set.
-
- ------------------------------
-
- Subject: -15- Why can't I log in after copying
- /usr/lib/X11/xdm/Xsession to .xsession?
- Date: 07 May 93 00:00:01 EST
-
- After copying this file to your home directory, you need to remove
- all references to "xsession". References to xsession cause the system
- to try to execute $HOME/.xsession, which will create an infinite
- loop.
-
- Remove the lines in ~/.xsession that say:
-
- if [ -r $xsession -a "$0" != $xsession ]; then
- if [ -x $xsession ]; then
- exec $xsession
- else
- exec /bin/sh $xsession
- fi
- fi
-
- ------------------------------
-
- Subject: -16- How can I find out what fonts are available?
- Date: 07 May 93 00:00:01 EST
-
- The xfontsel and xlsfonts utilities help you find appropriate fonts.
- xlsfonts lists the fonts; xfontsel provides an interface for
- selecting a desired font. To use xfontsel, choose "Font Names" from
- the Customization rollover menu in the Toolchest. Please see the man
- pages and the IRIS Utilities Guide for further information.
-
- ------------------------------
-
- Subject: -17- How can I use the Alt key as a Meta key in an xwsh
- window?
- Date: 23 Jun 94 00:00:01 EST
-
- First, put the following X resources wherever you put X resources:
-
- --- beginning of resources ---
- ! This turns Alt-key into Meta-key.
-
- XWsh*metaKeyMask: 8
-
- ! This allows multiple key modifiers in keybindings (so we can do
- ! meta-shift, meta-control, etc. and incidentally a) turns vt100
- ! cursor key mode off and b) changes the cursor key bindings.
-
- XWsh*keyboardType: xlib
-
- ! This turns vt100 cursor key mode back on. Running 'tset' at login
- ! resets the terminal and turns the cursor keys back off, so don't
- ! run it.
-
- XWsh*initSequence: \233?1h
-
- ! The iris-ansi terminfo entry has arrow key sequences for the ibmrt
- ! keyboard, not the xlib keyboard; for curses applications to work,
- ! the arrow keys must be bound to the sequences in the terminfo
- ! entry. Rebinding the arrow keys to match the terminfo entry is more
- ! convenient than changing the terminfo entry.
-
- XWsh*ckmeKeyMap: \
- Left(any): send("\033[D"); \
- Right(any): send("\033[C"); \
- Up(any): send("\033[A"); \
- Down(any): send("\033[B");
- --- end of resources ---
-
- 'tset' resets your terminal, so running it will undo the initSequence
- resource setting. There is a 'tset' command in the default csh/tcsh
- ~/.login file; replace the line
-
- eval `tset -s -Q`
-
- with
-
- if (! $?TERM) then
- eval `tset -s -Q`
- endif
-
- so 'tset' will run only if the TERM environment variable isn't
- already set. (You can't say 'if (! $?TERM) eval `tset -sQ`', because
- csh/tcsh evaluates the backquotes *before* the if.)
-
- Finally, if you use GNU Emacs, put the following in your .emacs:
-
- (set-input-mode nil nil t)
-
- This tells Emacs to allow Meta key usage even though the iris-ansi
- (xwsh) terminal description doesn't specify a Meta key.
-
- ------------------------------
-
- Subject: -18- How can I configure my keyboard like a VT100?
- Date: 14 Jun 94 00:00:01 EST
-
- 'xwsh -vt100' may be close enough; try it and see. (The PF keys are
- mapped to F9-F12.) If not, use 'xterm' and put the following (from
- Hemant Shah <shah@fnal.fnal.gov>) wherever you put the rest of your X
- resources:
-
- === snip ===
- XTerm*VT100.Translations: #override \
- <Key>BackSpace: string(0x7f) \n\
- <Key>Num_Lock: string(0x1b) string("OP") \n\
- <Key>KP_Divide: string(0x1b) string("OQ") \n\
- <Key>KP_Multiply: string(0x1b) string("OR") \n\
- <Key>KP_Subtract: string(0x1b) string("OS") \n\
- <Key>KP_Add: string(0x1b) string("Om") \n\
- <Key>Pause: string(0x1b) string("[34~") \n\
- <Key>Print: string(0x1b) string("[32~") \n\
- <Key>Scroll_Lock: string(0x1b) string("[33~") \n\
- <Key>KP_0: string(0x1b) string("Op") \n\
- <Key>KP_1: string(0x1b) string("Oq") \n\
- <Key>KP_2: string(0x1b) string("Or") \n\
- <Key>KP_3: string(0x1b) string("Os") \n\
- <Key>KP_4: string(0x1b) string("Ot") \n\
- <Key>KP_5: string(0x1b) string("Ou") \n\
- <Key>KP_6: string(0x1b) string("Ov") \n\
- <Key>KP_7: string(0x1b) string("Ow") \n\
- <Key>KP_8: string(0x1b) string("Ox") \n\
- <Key>KP_9: string(0x1b) string("Oy") \n\
- <Key>KP_Decimal: string(0x1b) string("On") \n\
- <Key>Insert: string(0x1b) string("[1~") \n\
- <Key>Home: string(0x1b) string("[2~") \n\
- <Key>Prior: string(0x1b) string("[3~") \n\
- <Key>Delete: string(0x1b) string("[4~") \n\
- <Key>End: string(0x1b) string("[5~") \n\
- <Key>Next: string(0x1b) string("[6~") \n\
- <Key>F1: string(0x1b) string("[17~") \n\
- <Key>F2: string(0x1b) string("[18~") \n\
- <Key>F3: string(0x1b) string("[19~") \n\
- <Key>F4: string(0x1b) string("[20~") \n\
- <Key>F5: string(0x1b) string("[21~") \n\
- <Key>F6: string(0x1b) string("[23~") \n\
- <Key>F7: string(0x1b) string("[24~") \n\
- <Key>F8: string(0x1b) string("[25~") \n\
- <Key>F9: string(0x1b) string("[26~") \n\
- <Key>F10: string(0x1b) string("[28~") \n\
- <Key>F11: string(0x1b) string("[29~") \n\
- <Key>F12: string(0x1b) string("[31~") \n\
- === snip ===
-
- This remaps the keys as follows:
-
- ----------------------------------------------------
- SGI Key | Emulated VT100 key
- ----------------------------------------------------
- Num Lock | PF1
- / | PF2
- * | PF3
- - | PF4
- 7 | 7
- 8 | 8
- 9 | 9
- + | -
- 4 | 4
- 5 | 5
- 6 | 6
- 1 | 1
- 2 | 2
- 3 | 3
- Enter | Enter
- 0 | 0
- . | .
- Insert | Find
- Home | Insert Here
- Page Up | Remove
- Delete | Select
- End | Prev Screen
- Page Down | Next Screen
- F1 | F6
- F2 | F7
- F3 | F8
- F4 | F9
- F5 | F10
- F6 | F11
- F7 | F12
- F8 | F13
- F9 | F14
- F10 | Help
- F11 | Do
- F12 | F17
- Print Screen | F18
- Scroll Lock | F19
- Pause | F20
-
- Any volunteers to work out similar bindings for xwsh?
-
- ------------------------------
-
- Subject: -19- RESOURCES
- Date: + 15 May 94 00:00:01 EST
-
- This section discusses Xwindows resources.
-
- ------------------------------
-
- Subject: -20- What are resources?
- Date: 07 May 93 00:00:01 EST
-
- Resources are "attributes" that control the look and feel of an
- application. Resources include color, fonts, size, location, and
- more. Resources can have a complex format for binding strengths.
-
- For a complete description of resources, including a description of
- "loose" and "tight" bindings, consult a book listed in the
- bibliography question above.
-
- ------------------------------
-
- Subject: -21- How can I set resources?
- Date: 07 May 93 00:00:01 EST
-
- There are many ways to set resources. Resources may be listed in
- files or contained in a data base. Consult a book on X as well as the
- xrdb(1) manpage for detailed descriptions. Generally speaking, if
- xrdb is not used, resource files are specified through environment
- variables. "What is a good approach to take in looking for
- resources?" addresses the precedence of these files and variables.
-
- For some examples in IRIX 4.0.x, see the file
- /usr/tutor/Customize/example.Xdefaults.
-
- ------------------------------
-
- Subject: -22- How can I use resources to run the same program twice
- with different attributes?
- Date: 07 May 93 00:00:01 EST
-
- To accomplish this task, you need to take advantage of the "instance
- vs class" concept. This concept is explained further in most books on
- Xt.
-
- Many applications have a resource that lets you to give it a unique
- name. For example, from the xwsh man page :
-
- -name instance-name
- Provide a unique name for an xwsh window. This name becomes
- the instance name of the specific xwsh, with the class name
- always being "XWsh".
-
- Using the -name option allows you to give "names" to different
- instances of xwsh and assign different resources to each one. So if
- you want two different xwsh's with different resource sets, give them
- two different names, say howdymom and howdydoody, for example. Add
- the following to your ~/.Xdefaults file (if you use .Xdefaults) :
-
- howdymom*foreground: SeaGreen
- howdydoody*foreground: SGIBeet
-
- Now all you have to do is start them up :
-
- xwsh -name howdymom&
- xwsh -name howdydoody&
-
- ------------------------------
-
- Subject: -23- Does the GL recognize resources?
- Date: 07 May 93 00:00:01 EST
-
- Yes. In IRIX 4.0 and later, the GL responds to several X resources,
- allowing run-time control over some aspects of GL programs.
-
- The man page assumes you are somewhat familiar with X resources, if
- you are not, you should read some X documentation such as Volume 3 of
- the O'Reily X books.
-
- The GL uses resources names with the prefixes
-
- appname.gl. (instance prefix)
- Appname.GL. (class prefix)
-
- where appname and Appname are derived from the argument to the GL
- program's first call to winopen(3G) upper case.
-
- For complete information see the man page for GLRESOURCES.
-
- ------------------------------
-
- Subject: -24- How can I know what resources I can set for an
- application?
- Date: 07 May 93 00:00:01 EST
-
- The most common place to find resource variables for a particular
- application is in the man page for that application.
-
- For example, take a look at the man page for `xwsh'. Look for the
- section heading called `RESOURCES'. This section lists each resource
- for `xwsh', and in some cases, the valid values for that resource.
-
- Also, many major applications are built on top of the Xt toolkit.
- There are standard resources that these applications recognize. For a
- more complete description, see one of the books on Xt listed in the
- bibliography.
-
- ------------------------------
-
- Subject: -25- What is a good approach to take in looking for
- resources?
- Date: 07 May 93 00:00:01 EST
-
- The following is a recommended list of steps to take when searching
- for a resource, binding, behavior, etc.
-
- 1) Look in the 4.0 Transition Guide.
- 2) Look in /usr/tutor/Customize.
- 3) Look in /usr/demos.
- 4) Look in ~4Dgifts. (Available with the development option.)
- 5) If the client you are interested in is a GL client, see the
- man page for GLRESOURCES.
- 6) Look in /usr/lib/X11/app-defaults/ClientName.
- 7) Look in /usr/lib/X11/system.* .
- 8) Look through the man page for the client you are interested in.
- 9) Look in O'Reilly & Associates Vol. III. It has many gems
- pertaining to standard X clients.
- 10) Look in the documentation that came with your application.
- 11) Look in the OSF Motif manuals.
- 12) Post to comp.windows.x if you can not find
- an answer using steps 1 through 11.
-
- ------------------------------
-
- Subject: -26- What is the precedence for resource files?
- Date: 07 May 93 00:00:01 EST
-
- The following list indicates the weight of set resources.
- Items at the top have the greatest weight.
-
- 1) Hard coded values for resources.
- 2) Command line arguments.
- 3) Resources pointed to by $XENVIRONMENT.
- 4) Resource values loaded into the Resource Data Base via xrdb.
- 5) Resources pointed to by other environment variables :
-
- IF $XUSERFILESEARCHPATH is set
-
- then it contains a list of directories to search.
-
- ELSE IF $XAPPLRESDIR is set
-
- it contains a single directory, and a short list of related
- directories (e.g. adjusted for language) is where resource files
- must be found.
-
- ELSE
-
- Look in a short list of places related to $HOME (e.g. language
- adjusted). This includes files in $HOME that have the name of
- the class of the application.
-
- 6) Resource values set in $HOME/.Xdefaults, provided that the
- RESOURCE_MANAGER property hasn't been set via the xrdb command.
- (see the third paragraph in the xrdb man page)
- 7) Values set in /usr/lib/X11/app-defaults/*.
- 8) Values set through through the application's fall back mechanism.
-
- ------------------------------
-
- Subject: -27- Why do long resources cause X to crash mysteriously in
- IRIX 5.2?
- Date: 13 Nov 94 00:00:01 EST
-
- Get patch 36 from the TAC.
-
- ------------------------------
-
- Subject: -28- 4DWM
- Date: 15 May 94 00:00:01 EST
-
- This section discusses the 4D Window Manager.
-
- ------------------------------
-
- Subject: -29- Where can I learn more about the Window Manager?
- Date: 07 May 93 00:00:01 EST
-
- The man pages for 4Dwm and mwm contain a wealth of information on the
- window manager. There are also online files. You may want to read
- /usr/tutor/Customize/example.4Dwmrc (IRIX 4.0.x only) as well as
- /usr/people/4Dgifts/.4Dwmrc (if you have the IDO option). The
- OSF/Motif manuals listed in the bibliography are also good places to
- find information. (4Dwm is based on mwm).
-
- ------------------------------
-
- Subject: -30- What files affect the window manager and what is their
- relationship to each other?
- Date: 07 May 93 00:00:01 EST
-
- 1) ~/.4Dwmrc, if you have one
- 2) /usr/lib/X11/system.4Dwmrc
- 3) /usr/bin/X11/4Dwm
- 4) /usr/lib/X11/app-defaults/4Dwm
- 5) ~/.Xdefaults (or wherever you set resources)
-
- When 4Dwm is started, it looks for ~/.4Dwmrc. If it does not exist,
- it looks at /usr/lib/X11/system.4Dwmrc. The definitions for button
- bindings, menus, etc are contained in these files. For a better
- description of bindings, look in /usr/tutor/Customize/example.4Dwmrc
- and /usr/people/ 4Dgifts/.4Dwmrc. Also see the man pages for 4Dwm.
-
- The resource set for the bindings will actually "choose" which
- binding definition is set.
-
- ------------------------------
-
- Subject: -31- Do I need my own .4Dwmrc file?
- Date: 07 May 93 00:00:01 EST
-
- Not necessarily. As mentioned in the previous question, actual
- bindings are determined by resource names. If there is a binding
- definition in /usr/lib/X11/system.4Dwmrc that you like, you may
- choose it by setting the appropriate resource.
-
- ------------------------------
-
- Subject: -32- Can I run a different window manager?
- Date: 07 May 93 00:00:01 EST
-
- IRIX has 4Dwm, mwm, twm, and uwm. However, GL programs are guaranteed
- to work only under 4Dwm.
-
- ------------------------------
-
- Subject: -33- How can I choose a different window manager as the
- default?
- Date: 07 May 93 00:00:01 EST
-
- You must use a .xsession file and explicitly invoke the window
- manager and any other applications you want to use, such as
- 'toolchest' and 'xwsh'.
-
- After making this change, you may only be able to log out by using
- the "Log Out" selection in the toolchest, or by executing
- /usr/bin/X11/endsession.
-
- Here are the contents of a sample .xsession file:
-
- xhost + &
- toolchest -name ToolChest > /dev/console 2&>1 &
- winterm -bg red &
- winterm -bg blue &
- mwm > /dev/console 2&>1 &
- /usr/bin/X11/reaper
-
- Note that 'reaper' is not put into the background. When 'reaper'
- exits you will be logged out.
-
- Alternatively, you can do the following steps:
-
- 1. cp /usr/lib/X11/xdm/Xsession ~/.xsession
-
- 2. Remove the lines in ~/.xsession that say:
-
- if [ -r $xsession -a "$0" != $xsession ]; then
- if [ -x $xsession ]; then
- exec $xsession
- else
- exec /bin/sh $xsession
- fi
- fi
-
- 3. Change the line that says
-
- /usr/bin/X11/4Dwm >/dev/console 2>&1 &
-
- to
-
- /usr/bin/X11/mwm > /dev/console 2>&1 &
-
- ------------------------------
-
- Subject: -34- How can I recover from a failed window manager
- customization attempt?
- Date: 07 May 93 00:00:01 EST
-
- If your attempt at customization leaves you in a state where buttons
- and menus are no longer recognized, you can recover by pressing the
- <Alt><CTRL><Shift><!>keys simultaneously. A menu appears that will
- let you choose Motif, Iris, or user defaults. Choose either Motif or
- Iris defaults and then push OK. This restarts the window manager to a
- usable state.
-
- ------------------------------
-
- Subject: -35- Why is an extra 4Dwm burning CPU in IRIX 4.0.x?
- Date: 07 May 93 00:00:01 EST
-
- This multiple window manager problem is usually triggered by the
- "kill" feedback of the window manager when a user logs out. The
- workaround for the problem is to remove the "kill" feedback.
-
- The "kill" feedback is controlled by the resource "showFeedback."
- For 4Dwm, this resource is defined in /usr/lib/X11/app-defaults/4DWm
- as:
-
- *showFeedback: behavior restart quit kill
-
- Modify the resource to read:
-
- *showFeedback: behavior restart quit
-
- For mwm, set a "showFeedback" resource that does not include the
- "kill" feedback in /usr/lib/X11/app-defaults/Mwm. A sample setting
- is:
-
- Mwm*showFeedback: move placement resize behavior restart quit
-
- ------------------------------
-
- Subject: -36- Why doesn't the window manager's "Log Out" routine work
- in IRIX 4.0.5?
- Date: 09 Jan 94 00:00:01 CST
-
- "Log Out" runs 'endsession', which under some versions of IRIX 4.0.5
- does not work if your hostname contains a number. Fortunately,
- 'endsession' is a script, and you can fix it by changing the line
-
- PROP_DISPLAY=`expr $DISPLAY : '\(.*\).[1-9]' \| $DISPLAY`
-
- to
-
- PROP_DISPLAY=`expr $DISPLAY : '\(.*\)\.[1-9]' \| $DISPLAY`
-
- i.e. just add a backslash before the second period.
-
- ------------------------------
-
- Subject: -37- ADMINISTRATION
- Date: 15 May 94 00:00:01 EST
-
- This section describes how to start and stop parts of the graphics
- system in various funky ways.
-
- ------------------------------
-
- Subject: -38- How can I log into pandora/clogin without bringing up
- graphics?
- Date: 07 May 93 00:00:01 EST
-
- Add the magic word 'failsafe' after your username. E.g. to log in as
- root without graphics, you'd type 'root failsafe', whack Enter, and
- type your password.
-
- ------------------------------
-
- Subject: -39- How can I restart the console?
- Date: 07 May 93 00:00:01 EST
-
- Use /usr/sbin/startconsole. 'startconsole' and 'winterm' (which
- 'startconsole' calls) are scripts, so you can see how they do it.
-
- ------------------------------
-
- Subject: -40- How can I start and stop the graphics system?
- Date: 07 May 93 00:00:01 EST
-
- Use /usr/gfx/startgfx and /usr/gfx/stopgfx. Be aware that stopgfx
- will kill any active windows and log you out.
-
- ------------------------------
-
- Subject: -41- How can I kill the X server without logging in or
- rebooting?
- Date: 22 Jan 94 00:00:01 EST
-
- Hold down the left-Control, left-Shift, F12 and keypad slash keys.
- This is fondly known as the "Vulcan Death Grip".
-
- ------------------------------
-
- Subject: -42- How can I run 'xinit' manually, rather than
- automatically from 'xdm'?
- Date: 07 May 93 00:00:01 EST
-
- By doing the following, which will affect all users:
-
- 1) log in as root
- 2) Type:
- /usr/gfx/stopgfx
- chkconfig xdm off.
-
- 3) all users need to copy /usr/bin/X11/X to their home directory
- (renaming the file to .xserverrc), removing the if test for
- windowsystem, OR be familiar enough with xinit to have an
- alternate command line.
- 4) transfer all startup programs from .xsession/.sgisession to
- .xinitrc.
- 5) the last program to start from .xinitrc must not exit. When this
- one exits, the session terminates.
-
- ------------------------------
-
- Subject: -43- How can I start X on a remote host with no users logged
- in?
- Date: 07 May 93 00:00:01 EST
-
- This example starts up an xclock on the remote system. The easy way
- to test this for now is to rlogin to the system and type the
- commands. Once something works you can write some shell scripts and
- use rsh to run them:
-
- hydra is being used to login to oscar and start graphics on oscar.
- oscar is displaying the pandora login when this is done:
-
- hydra 2% rlogin oscar -l root
- oscar 1# /usr/gfx/stopgfx (screen blanks)
- oscar 2# chkconfig windowsystem on
- oscar 3# setenv DISPLAY :0.0 (display on local screen)
- oscar 4# /usr/bin/X11/X & (start Xsgi)
- oscar 5# xclock & (clock is displayed)
-
- To clean up:
-
- oscar 6# /usr/gfx/stopgfx (screen blanks)
- oscar 7# /usr/gfx/startgfx (re-start pandora)
-
- ------------------------------
-
- Subject: -44- IMAGE FILES
- Date: 15 May 94 00:00:01 EST
-
- This section discusses image files and formats.
-
- ------------------------------
-
- Subject: -45- How can I convert images to and from other formats?
- Date: 20 May 94 00:00:01 EST
-
- IRIX comes with several tools which convert images to or from SGI's
- RGB format. The executables are part of the eoe2.sw.imagetools
- subsystem, and include:
-
- fromalias - convert an Alias image to an IRIS image
- frombin - create an RGB IRIS image file from a binary dump of image data
- fromcmap - convert a color map into an image with one scanline
- fromcube - convert a Cubicomp/Vertigo image file to IRIS format
- fromdi - convert an old .di dithered image into an IRIS image
- fromface - convert a UNIX faceserver image into an IRIS image
- fromgif - convert a GIF image into an IRIS image
- frommac - convert a MacPaint image into an IRIS image
- frompic - convert a MOVIE BYU .PIC image to an IRIS image
- fromppm - convert an image in Jef Poskanzer's format into an IRIS image
- fromrla - convert a Wavefront image to an IRIS image
- fromsun - convert a sun image into an IRIS image
- fromtarga - convert a targa image into an IRIS image
- fromxbm - convert an X Bitmap image into an IRIS image
- fromxud - convert an xwd file into an IRIS image
- fromxwd - convert an xwd file into an IRIS image
- fromyuv - convert an Abekas yuv image into an IRIS image
- toalias - convert an IRIS image to an Alias image
- toascii - convert an IRIS image to text characters
- tobin - convert an IRIS image to binary dump of pixel data
- tobw - convert an IRIS image to black and white
- togif - convert an IRIS image to a Compuserve GIF image
- tomac - convert an IRIS image to MacPaint format
- tonews - convert an IRIS image into NeWS format
- topict - convert an IRIS image to Macintosh PICT format
- toppm - convert an IRIS image file into Jef Poskanzer's ppm image format
- tops - convert an IRIS image to PostScript
- toscitex - Convert IRIS images into Scitex CT2T images
- tosun - convert an IRIS image to a sun raster file
- totarga - convert an IRIS image to a type 2 targa image
- toyuv - convert an IRIS image to yuv format
-
- The source for each of these tools is in the 4Dgifts
- dev.dev_sw.giftsfull subsystem and placed in the directory
- /usr/people/4Dgifts/iristools/imgtools. Each also has a manpage.
-
- Similar tools for more formats ('frompict', 'frompixar', 'fromtiff',
- 'fromutah', 'totiff', 'toutah' and 'toxbm' at last count), as well as
- some which come with IRIX and a few miscellaneous cool image editing
- tools, are in ftp.sgi.com:/graphics/bin/. 'fromjpeg' and 'tojpeg' can
- be found in explorer.dgp.toronto.edu:/pub/sgi/sgijpeg/.
- swedishchef.lerc.nasa.gov:/ has 'fromvicar' in
- /image/conversion/from/, 'tocolps' and 'topcl' in
- /image/conversion/to/ and many other image- related tools in nearby
- directories.
-
- Finally, 'imgworks' (in the imgtools.sw.tools subsystem) understands
- RGB, TIFF and FIT formats, and several freeware programs including
- SDSC's 'imtools' (in
- ftp.sdsc.edu:/pub/sdsc/graphics/imtools/sgi_4d/), 'xv' (in
- ftp.cis.upenn.edu:/pub/xv/) and ImageMagick (in
- ftp.x.org:/contrib/applications/ImageMagick/) work on SGIs and
- understand SGI's RGB format as well as many other formats.
-
- ------------------------------
-
- Subject: -46- What is the format of SGI's RGB files?
- Date: 30 Apr 94 00:00:01 EST
-
- Read ftp.sgi.com:/graphics/SGIIMAGESPEC.
-
- ------------------------------
-
- Subject: -47- How can I compress RGB bitmaps?
- Date: 07 May 93 00:00:01 EST
-
- Use /usr/sbin/rle, which is part of eoe2.sw.imagetools.
-
- ------------------------------
-
- Subject: -48- How can I make a screen dump?
- Date: 13 Nov 94 00:00:01 EST
-
- Use the utilities 'imgsnap' (IRIX 4.0.x only), 'scrsave', 'snapshot'
- or 'xwd'. All have manpages. 'imgsnap' is in the imgtools.sw.tools
- subsystem, 'scrsave' and 'snapshot' are in the eoe2.sw.gltools
- subsystem, 'xwd' is in x_eoe.sw.Xapps and their manpages are in the
- respective *.man.* subsystems.
-
- From within a GL program, you should call readdisplay(). For an
- example look at ~4Dgifts/iristools/imgtools/scrsave.c.
-
- ------------------------------
-
- Subject: -49- PROGRAMMING
- Date: 15 May 94 00:00:01 EST
-
- This section discusses graphics programming. See the apps, audio and
- movie FAQs for general, audio and movie programming issues and the
- ! impressario, inventor and performer FAQs for discussions of those
- packages.
-
- ------------------------------
-
- Subject: -50- Can I use 4Dgifts code in my application?
- Date: 07 May 93 00:00:01 EST
-
- Yes. The 4Dgifts are a "gift" and developers are welcome to use the
- code. However, SGI does not support the code in 4Dgifts. Note that
- certain restrictions apply. Please read the copyright statement in
- ~4Dgifts/README.Copyright.
-
- ------------------------------
-
- Subject: -51- What does ERR_WMANIPC mean?
- Date: 07 May 93 00:00:01 EST
-
- The "WMAN" in that message means "window manager." However, this no
- longer means "window manager" such as 4Dwm, but rather the entire X
- Window system. The error means that the GL program triggered a fatal
- X error.
-
- A GL program can get an X error, because all GL programs are actually
- X clients. When a GL program does a winopen(), libgl actually calls
- XCreateWindow, etc.)
-
- When a GL program gets an X error, libgl prints out these X errors
- using this error message:
-
- GL: X request = maj.min, error code = ercode
-
- where
-
- maj = major request code that caused the error
- min = minor request code
- ercode = X error code
-
- This turns out to be easy to interpret, so long as the request was a
- core X protocol request (e.g., a CreateWindow request). In that
- case:
-
- 1. You can look up the major code in /usr/include/X11/Xproto.h.
- 2. The minor code is not used.
- 3. The X error code can be found in /usr/include/X11/X.h.
-
- As you can see in Xproto.h, the core X protocol requests have request
- codes <= 127.
-
- However, if maj > 127, then the request is an X extension request.
- Unfortunately, it can be difficult to interpret this unless you built
- your program with a debugging libgl.a (compiled with -g). The reason
- is that for an X extension, the major request code and the starting
- error code are copied from the X server during client startup, and
- these codes are saved in variables inside libgl. With a debugging
- libgl, these variables can be printed out from within a debugger,
- such as dbx.
-
- If the major code indicates an X Input extension request, then the
- minor numbers then tell the X input request type, and these are found
- in /usr/include/X11/extensions/XIproto.h.
-
- Finally, the X Input Extension uses 132 as its "starting error code."
- The possible errors are found in /usr/include/X11/extensions/XI.h,
- where they're defined like this:
-
- #define XI_BadDevice 0
- #define XI_BadEvent 1
- #define XI_BadMode 2
- #define XI_DeviceBusy 3
- #define XI_BadClass 4
-
- If you add 132 to these numbers, you get the error that's reported by
- the libgl error message.
-
- ------------------------------
-
- Subject: -52- How can I translate screen (x,y) coords into world
- (x,y,z) coords?
- Date: 07 May 93 00:00:01 EST
-
- Check the manual page for mapw(3G) or mapw2(3G). mapw() returns a
- line into (x,y,z) space.
-
- ------------------------------
-
- Subject: -53- How can I translate world (x,y,z) coords into screen
- (x,y) coords?
- Date: 07 May 93 00:00:01 EST
-
- There are two methods. The first method is detailed in
- ~4Dgifts/examples/grafix/world2scrn.c, which is part of the
- dev.dev_sw.giftsfull package. It multiplies the (x,y,z) vector into
- the current modeling and projection matrixes, and uses the result to
- interpolate based on the window size and position.
-
- The second method uses the current cursor position as a trick and is
- much simpler. Use cmov() to set the cursor position to the point of
- interest in world space, then call getcpos() to return the cursor
- position in screen coordinates. Note that if your entire viewport is
- off-screen, the results are undefined and you'll have to use the
- first method.
-
- float x,y,z;
- short x1, y1;
-
- cmov (x,y,z);
- getcpos (&x1, &y1);
-
- ------------------------------
-
- Subject: -54- Why does nothing happen when I call mapcolor(index, R,
- G, B)?
- Date: 07 May 93 00:00:01 EST
-
- You either need to call glcompat(GLC_SLOWMAPCOLORS, TRUE) at the
- beginning of your program, or call gflush() after calling mapcolor.
-
- See the NOTES section in "man mapcolors" and also "man glcompat" for
- further info. (This may also be in the GL release notes)
-
- ------------------------------
-
- Subject: -55- What's wrong with blink() in IRIX 4.0.x?
- Date: 10 Jun 93 00:00:01 EST
-
- - blink() is broken all the way up through 4.0.5F, where blink() only
- blinks to black.
-
- - you can work-around this blink() problem by doing the following:
-
- blink(rate, index, red<<8, green<<8, blue<<8)
-
- - ~4Dgifts/examples/glpg/ch04/blinker.c has three main problems:
-
- - it doesn't do the above work-around.
- - it doesn't do a gflush after mapping colors.
- - it doesn't turn blinking off initially.
-
- - what happens is that if a program starts anything blinking and
- exits without ever turning blinking off with blink(-1, 0, 0, 0, 0)
- then the next program to attempt blinking will not be able to
- blink. this happens if for instance you close the blinker window
- before its 10 second sleep() has completed.
-
- - a simple idea for a work-around for this problem: programs which do
- blinking should turn their blinking on when they have focus; they
- should turn all blinking off when they lose focus. This is not
- perfect but is a plausible attempt at sharing the 20 blinking
- system-wide colormap entries.
-
- Here is a copy of ~4Dgifts/examples/glpg/ch04/blinker.c that contains
- the above workarounds, except for input-focus:
-
- #include <gl/gl.h>
-
- #define MAXBLINKS 20 /* maximum number of blinking entries */
- #define FIRSTBLINKCI 64 /* avoid the first 64 colors */
-
- main()
- {
- int i;
-
- prefsize(400, 400);
- winopen("blinker");
- ortho2(-0.5, 20.0*MAXBLINKS + 9.5, -0.5, 500.5);
- color(BLACK);
- clear();
-
- /* always turn blinking off before calling 'blink' */
- blink (-1, 0, 0, 0, 0);
-
- for (i = MAXBLINKS - 1; i >= 0 ; i--) {
- mapcolor(i + FIRSTBLINKCI, 255, 255, 255);
- /* always call gflush() after mapcolors() */
- gflush();
- color(i + FIRSTBLINKCI);
- sboxfi(i*20 + 10, 10, i*20 + 20, 490);
- /* GL bug in blink -- must left-shift r,g,b values */
- blink(i + 1, i + FIRSTBLINKCI, 255 << 8, 0 << 8, 0 << 8);
- }
- sleep(10);
- blink(-1, 0, 0, 0, 0); /* stop all blinking */
- gexit();
- return 0;
- }
-
- ------------------------------
-
- Subject: -56- Why can't 'cc' find some standard Xwindows functions?
- Date: 14 May 94 00:00:01 EST
-
- You may be linking X libraries, which have complex interdependencies,
- in the wrong order. Mark Kilgard <mjk@hoot.asd.sgi.com> provided this
- handy chart:
-
- libXm--libXirisw
- \
- libXt--libXmu--libgl--libXi--libXext--libX11
- /
- libXaw
-
- Libraries should be listed in the same order on the cc or ld command
- line, left to right, as they appear above. If you don't use routines
- from a library, of course, you don't need it.
-
- ------------------------------
-
- Subject: -57- Where is the library /usr/lib/libgl_s.a for my R4000
- Indigo running IRIX 4.0.5F?
- Date: 07 May 93 00:00:01 EST
-
- It's in the "maint" software, in the maint_gl_x_dev package.
-
- ------------------------------
-
- Subject: -58- What is a GL widget?
- Date: 10 Jun 93 00:00:01 EST
-
- GL widget refers to the GlxDraw (generic) and GlxMDraw (Motif)
- widgets that allow you to embed GL windows in Xt-based programs. To
- embed a GL windows in X-based programs is frequently called
- "Mixed-model" or "GLX" programming.
-
- There are several examples of mixed-model programming in the
- directory /usr/people/4Dgifts/examples/GLX.
-
- ------------------------------
-
- Subject: -59- I'm using the GlxMDraw widget and it doesn't seem that
- colors are being installed correctly. Overlays in the
- GlxMDraw widget are displayed in red and gray instead of
- the colors I specify. What's wrong?
- Date: 10 Jun 93 00:00:01 EST
-
- The window manager must be directed to install all appropriate
- colormaps. Use the XSetWMColormapWindows() call to do this -- list
- one window for each colormap to be installed plus the top level
- window. If using overlays, include the overlay window as well as the
- normal GL window.
-
- If your window is TrueColor, you should still install the appropriate
- colormap, as Indigo TrueColor is simulated using a colormap.
-
- ------------------------------
-
- Subject: -60- Is there a way to switch between single and double
- buffering within a GL widget on the fly?
- Date: 10 Jun 93 00:00:01 EST
-
- There is no way to switch between single and double buffered mode
- within the same window. (In X, this would mean changing the depth,
- which is not allowed.)
-
- To simulate this, you can create two GL widgets: a double buffered GL
- widget and a single buffered GL widget. When it is time to change
- the buffering mode, restack the windows so that the appropriate one
- is on top. If the two windows are created with a common parent, they
- move together when the parent is moved.
-
- For non-mixed mode applications, the GL performs this switching when
- you call gconfig().
-
- ------------------------------
-
- Subject: -61- Why doesn't my X server use backing store? How can I
- turn it on?
- Date: 12 Feb 94 00:00:01 EST
-
- Mark Kilgard of SGI <mjk@hoot.asd.sgi.com> writes,
- SGI ships its X server with backing store disabled. If you edit
- /usr/lib/X11/xdm/Xservers and remove the -bs option, then restart the
- X server, backing store will be available.
-
- The reason for not turning on backing store by default is two-fold.
-
- 1) In IRIX 4.0.X the code for managing overlay planes didn't properly
- take overlays into account so backing store doesn't work if you
- have overlay windows on the screen. This is fixed in IRIX 5.x.
-
- 2) In most cases, backing store hurts your performance. It cases ALL
- X rendering operations to make an extra (small) traversal through
- backing store code even if backing store isn't in use. Also when
- backing store is in use, it tends to grow the X server since a
- large amount of memory can easily be used to maintain backing
- store.
-
- One alternative to backing store is to render your image to a pixmap
- and then blit from the pixmap to the screen in response to expose
- events. This will stress the X server a great deal less than using
- backing store. Additionally, make sure you are compressing expose
- events when you redraw.
-
- ------------------------------
-
- Subject: -62- What is "/dev/tport" used for?
- Date: 26 May 93 00:00:01 CST
-
- Mark Stadler (mds@sgi.com) says:
- /dev/tport is a streams-based tty device driver which can be in one
- of 2 modes:
-
- - when X is not running, /dev/tport gets its input from the graphics
- keyboard and images in the frame buffer (textport mode). This mode
- is only intended to be used in single-user mode or during
- transitional periods when the X server is not running.
-
- - when X is running, /dev/tport doesn't get any input and generates
- no output. Any programs or shells using /dev/tport hang on reads
- and toss writes.
-
- Kind of a strange device. But it makes more sense with a clear
- understanding of how /dev/console works.
-
- /dev/console is kind of like a terminal switch box. Rather than
- switching physical rs232 cables, we direct console output onto the
- output stream of other streams-based devices who request such
- behavior with TIOCCONS ioctl.
-
- By default, /dev/console directs its output to /dev/tport. In the
- absence of a windowing system this causes console output (including
- kernel prints) to show up on the textport in front of you.
-
- Once the window system is started, the /dev/tport is no longer
- visible. Thus the console is no longer visible. At this point, a
- terminal emulation window (using streams based ttys) can issue the
- TIOCCONS ioctl to cause console output (including kernel printfs) to
- show up in the emulation in the window in front of you.
-
- Note that when you bring the window system down, /dev/tport is still
- there with the same session it started with and the console output
- redirected back to it again.
-
- ------------------------------
-
- Subject: -63- BUGS AND PROBLEMS
- Date: 15 May 94 00:00:01 EST
-
- This section discusses real and apparent bugs and problems we haven't
- covered already.
-
- ------------------------------
-
- Subject: -64- Why do I get a "Broken Pipe" error when I close an X
- client window?
- Date: 10 Jun 93 00:00:01 EST
-
- Typically the error message looks like: XIO: fatal IO error 32
- (Broken pipe) on X server ":0.0" after 214 requests (214 known
- processed) with 0 events remaining. The connection was probably
- broken by a server shutdown or KillClient.
-
- The Window Manager is reporting that the pipe for your X client has
- been broken. This is normal when an X client exits. There is
- nothing wrong with your system. This message will also occur when the
- system is shut down. This is not an error condition and no core
- files are produced.
-
- ------------------------------
-
- Subject: -65- What do the errors in my 'xdm-errors' file mean?
- Date: 07 May 93 00:00:01 EST
-
- It depends on the error message, obviously. Some are:
-
- unable to load display mode, rnid = 196614, errno = 22
- Failed to unbind rn from clip, rnid = 3,errno = 22
- bogus window id in rrm request type(2)
-
- These are messages related to the communication between the rrm layer
- in the kernel and the X server. The messages usually occur when a GL
- window is being destroyed in a sequence that the X server did not
- expect. They are quite benign.
-
- ------------------------------
-
- Subject: -66- Why doesn't SGI's xlock lock my screen?
- Date: 10 Jun 93 00:00:01 EST
-
- If you or the super-user don't have a password, xlock will not lock.
-
- Under IRIX 4.0.x, xlock is set up by default to act as if invoked
- with the "-nolock" option, which tells it not to lock the screen. If
- you want force xlock to lock, do either of the following:
-
- a) Use the "+nolock" option when invoking xlock. This means
- "not nolock" (the opposite of "-nolock"). For example:
-
- % xlock +nolock
-
- b) Add the following line to your ~/.Xdefaults file:
-
- XLock.nolock: False
-
- In IRIX 5.x, the default behavior of xlock has been reversed, so
- xlock does indeed lock by default. If you wish to keep the IRIX 4.x
- behavior, invoke xlock with the -nolock option.
-
- ------------------------------
-
- Subject: -67- Sun XView applications like "mailtool" hang my X server
- in IRIX 4.0.5. They come up fine, but when I click on
- them the server freezes.
- Date: 07 May 93 00:00:01 EST
-
- Any XView application run under the Xsgi X11-server shipped in IRIX
- versions 4.0.5A through 4.0.5G will lock the X Server on the first
- mouse click and will not release it until killed from somewhere
- else. Fortunately there is a workaround:
-
- a) Run the application with '-Wfsdb' on the command line.
- Alternatively you could use '-fullscreendebug'. For example:
-
- % mailtool -Wfsdb
-
- b) If you have the sources, add
-
- extern int fullscreendebug;
-
- before main() and
-
- fullscreendebug = 1;
-
- after the xv_init() call. This forces the program to set this
- flag in any case - even when run with non-SGI X servers. It
- releases you of the danger of omitting -Wfsdb and locking your
- screen.
-
- c) if the program uses the 'fullscreen' package, you might add
-
- Fullscreen.Debug: True
-
- in $HOME/.Xresources or specify this resource on the command
- line. This flag currently disables grabs in both the 'window' and
- the 'fullscreen' package, but is only set from resources in the
- 'fullscreen' package.
-
- ------------------------------
-
- Subject: -68- Why can't I log into Pandora in IRIX 4.0.1?
- Date: 07 May 93 00:00:01 EST
-
- The problem is caused by an incorrect shutdown. When you log out,
- xdm runs /usr/sbin/gamma and writes the current value to
- /etc/config/system.glGammaVal. IRIX buffers this data in main memory
- in the buffer cache. If the system is powered off right after
- logout, the data is not written to the file.
-
- a) Login to your system as root, either via the network or
- by taking the machine down to single-user mode.
-
- b) enter these commands at the # prompt:
-
- # cd /etc/config
- # cat system.glGammaVal
-
- If the cat command returns a value of 1.7000, contact your technical
- support provider for additional troubleshooting. If the command
- returns nothing (empty file) or "0", it means the problem can be
- fixed by entering the following command:
-
- # /bin/rm system.glGammaVal
- # /bin/echo "1.7" > system.glGammaVal
-
- Check your work:
-
- # cat system.glGammaVal
-
- The command above should now return 1.7.
-
- Your login should now be successful. If you edited the file while
- Pandora was running, you'll find the first login attempt will fail,
- but any later attempts will be successful. After the first login
- attempt, Pandora will read in the correct gamma value.
-
- ------------------------------
-
- Subject: -69- Pandora won't come up, and /usr/adm/SYSLOG says
- "helvetica font missing"
- Date: 07 May 93 00:00:01 EST
-
- It appears that the subsystem "eoe2.sw.fonts" did not get loaded.
- Re-install the subsystem using the following sequence from 'inst':
-
- 1) type "inst" or boot the mini-root, as documented in Section 4.5
- of the "IRIS Software Installation Guide"
- 2) keep *
- 3) set neweroverride on
- 4) install eoe2.sw.fonts
- 5) exit
-
- ------------------------------
-
- Subject: -70- Why does the X server sometimes abort when I log out in
- IRIX 5.0.1 and IRIX 5.1?
- Date: 01 Oct 93 00:00:01 EST
-
- BACKGROUND: Both problems are related to resetting of the X server.
- Normally the X server process is spawned by xdm (the X Display
- Manger). The X server process continues to run after every login and
- logout of the graphics head; the server simply resets to its initial
- state every time someone logs out. In X server terminology, the X
- server goes through multiple generations.
-
- PROBLEM 1: The dynamically loadable Display PostScript extension has
- a bug where it does not properly reset the X server state on server
- reset (ie, generations other than the first).
-
- The problem only occurs if you have dps_eoe.sw.xserver_ext (which
- contains /usr/lib/X11/dyDDX/xdps.so which is the dynamically loadable
- Display PostScript extension). dps_eoe is installed by default.
-
- This problem affects all CPUs and graphics hardware.
-
- PROBLEM 2: If the user logs out while any GL-based application (such
- as buttonfly, WorkSpace, jot, etc) is running, the server will not
- reset.
-
- Typically you will find errors in /usr/adm/SYSLOG similar to the
- following:
-
- date host xdm[pid]: IO Error in XOpenDisplay
- date host xdm[pid]: Display :0 cannot be opened
- date host xdm[pid]: Display :0 is being disabled
- date host xdm[pid]: Rescanning both config and servers files
-
- WORKAROUND: As root, edit /usr/lib/X11/xdm/xdm-config and change the
- line
-
- DisplayManager._0.terminateServer: False
-
- to
-
- DisplayManager._0.terminateServer: True
-
- (Please note that the contents of xdm-config are case-sensitive.)
- Then restart the window system (/usr/gfx/stopgfx; /usr/gfx/startgfx)
-
- If the above workaround doesn't work, try setting
-
- DisplayManager._0.startAttempts: 1
-
- to
-
- DisplayManager._0.startAttempts: 4
-
- This change forces xdm to try to start the X server up to four times,
- if the first three fail.
-
- ------------------------------
-
- Subject: -71- After running a few programs, the colors change as the
- cursor moves. The colors are usually all wrong in other
- windows.
- Date: 07 May 93 00:00:01 EST
-
- This is known as colormap flashing. It is caused by the server
- maintaining 2 separate colormaps, one for GL windows and one for X
- windows. As the cursor moves around, the window manager will install
- the correct colormap for each window. This will cause colors to be
- wrong in other windows. For more information on colormaps and
- installation please see the Xlib Programming manual, chapter 7 (Vol I
- of the O'Reilly series).
-
- You can sometimes avoid colormap flashing by configuring your X
- Server to use a 12-bit or 24-bit visual by default.
-
- ------------------------------
-
- Subject: -72- How can I make my X Server use a 12-bit PseudoColor, 12-
- bit TrueColor or 24-bit TrueColor visual by default?
- Date: 07 May 93 00:00:01 EST
-
- By default, the SGI X Server is configured to use an 8-bit
- PseudoColor visual. X-based applications can request other visuals
- directly if they are available. Alternatively, you can change the
- default visual by performing the following steps:
-
- a) Run "/usr/bin/X11/xdpyinfo" and check that your server is
- capable of using a 12-bit or 24-bit visual. If it is,
- you will see lines similar to the following:
-
- visual id, max buffers, depth: 0x28, 0, 12
- visual id, max buffers, depth: 0x29, 0, 12
- visual id, max buffers, depth: 0x2a, 0, 24
-
- The last number on each line represents the number of bits
- available for that visual.
-
- b) Log in as root
-
- c) Edit the file /usr/lib/X11/xdm/Xservers. By default it
- will contain the string:
- :0 secure /usr/bin/X11/X -bs -c -pseudomap 4sight
- for a 24-bit TrueColor visual change it to:
- :0 secure /usr/bin/X11/X -bs -c -class TrueColor -depth 24
- for a 12-bit PseudoColor visual change it to:
- :0 secure /usr/bin/X11/X -bs -c -class PseudoColor -depth 12
-
- d) Restart your X server. You can do this by invoking either
- of the following commands:
-
- % killall -TERM Xsgi
-
- % /usr/gfx/stopgfx; /usr/gfx/startgfx
-
- Note: X Server visuals are an advanced topic; before making the
- above changes you should be aware that some 3rd-party and freeware
- applications might not gracefully adapt to an X Server which supplies
- anything but an 8-bit PseudoColor visual by default.
-
- ------------------------------
-
- Subject: -73- When I try to run UIM/X uxserverd, I get an error
- message saying, "license file has been modified, cannot
- start the UIM/X license server".
- Date: 07 May 93 00:00:01 EST
-
- You probably have been given a bad key. The most frequent causes of
- incorrect keys have been incorrect capitalization and incorrect IP
- addresses.
-
- The program that generates the UIM/X key requires that the "host ID"
- (or IP address) be in hexadecimal format. If you feed it the
- standard form of IP address (i.e., 123.45.678.90) it will generate
- the wrong key and will not complain.
-
- To ensure that you are is giving the correct information when
- requesting a UIM/X key, please do the following:
-
- Hostname: Type in 'hostname' at the prompt, and be sure to say
- exactly what it says (including capitalization, if any).
-
- Host ID: Type in 'hostid' at the prompt, and be sure to say exactly
- what it says. You will be reading back a series of numbers of the
- form 0xc030c844. The leading 0x indicates that the following number
- is hexadecimal.
-
- The key generating script is highly sensitive to capital letters.
- Make sure you confirm the case of the letters, both when getting the
- hostname/hostid and when having your key read back to you.
-
- If this still doesn't fix the problem, you may have mixed files
- between UIM/X 1.0 and 2.0. Completely remove UIM/X, re-install it,
- and reproduce a Uimx2_0.license file with the correct information.
-
- ------------------------------
-
- Subject: -74- MISCELLANEOUS
- Date: 15 May 94 00:00:01 EST
-
- Everything else.
-
- ------------------------------
-
- Subject: -75- What books about the X Window System and OSF/Motif do
- you recommend?
- Date: 07 May 93 00:00:01 EST
-
- Introductory Texts on the X Window System
-
- - O'Reilly and Associates Inc., "The Definitive Guides to the X
- Window System", by Valerie Quercia and Tim O'Reilly. Vol. 3, "X
- Window System User's Guide", Sebastopol, CA., 1988, 1989.
-
- Discusses being an end user of the X window system. Covers topics
- like window manages, font specifications, standard X clients and
- resources.
-
- Texts on X Window System Programming
-
- - O'Reilly and Associates, Inc. "The Definitive Guides to the X
- Window System", by Adrian Nye. Vol. 1, "Xlib Programming Manual",
- Sebastopol, CA, 1990.
-
- Contains the introductory elements for programming with the Xlib,
- the lowest level of the X window system. Discusses concepts such
- as X color capacities, windows, events, drawing primitives.
-
- - Young, Douglas A., "X Window Systems Programming and Applications
- with Xt" (OSF/Motif Edition). Prentice Hall. Englewood Cliffs, NJ.
- 1990.
-
- A thorough book starting with the basics of programming with a
- toolkit though advanced topics. Contains source code for several
- small complete applications. (Source code for this book is also
- available on line in the /usr/src directory of the Motif
- Development option.)
-
- - O'Reilly and Associates Inc., "The Definitive Guides to the X
- Window System", by Adrian Nye and Tim O'Reilly. Vol. 4, "X Toolkit
- Intrinsics Programming Manual", Sebastopol, CA., 1990.
-
- Another reference for programming with the OSF/Motif toolkit.
- Covers topics including basic programming, widgets, resources, and
- more advanced topics.
-
- Reference Texts for the X Window System :
-
- - O'Reilly and Associates Inc., "The Definitive Guides to the X
- Window System", by Adrian Nye. Vol. 2, "Xlib Reference Manual",
- Sebastopol, CA., 1988.
-
- Complete reference for Xlib library routines.
-
- - Scheifler, Robert and James Gettys, X Window System, Second
- Edition, Digital Press, 1990. ISBN 1-55558-050-5.
-
- Referred to as "the Bible" of Xlib and X Protocol reference.
-
- Reference Texts for the OSF/Motif Toolkit :
-
- - Open Software Foundation, "OSF/Motif Programmer's Guide". Release
- 1.1, Prentice Hall. Englewood Cliffs, NJ. 1990.
-
- Exhaustive reference of every widget in the OSF/Motif library.
-
- - Asente, Paul J. and Ralph R. Swick. "X Window System Toolkit".
- X Version 11, Release 4. Digital Press. 1990.
-
- Very in-depth reference to the structure and operation of an X
- window system toolkit.
-
- ------------------------------
-
- Subject: -76- Does the IRIX 5.2 Magic user environment display on an X
- terminal?
- Date: 30 Apr 94 00:00:01 EST
-
- Joel Tesler <joel@jellotrees.esd.sgi.com> says: Although it is not
- officially supported, it should work in IRIX 5.2 MR (but not in the
- beta release). There are some glitches. You probably don't have to
- set the environment variable _NO_DESKTOP_IMAGES, but try it if you
- have problems. There should be no reason to set _SGI_NO_REMOTE_GL.
-
- ------------------------------
-
- Subject: -77- What about OpenGL?
- Date: 22 Oct 94 00:00:01 EST
-
- It has its own newsgroup, comp.graphics.opengl, which has an FAQ,
- which is listed in the misc FAQ. The misc FAQ also points to an
- OpenGL WWW page.
-
- ------------------------------
-
- Subject: -78- Which SGI machines can run OpenGL now? Which will in the
- future?
- Date: 12 Jun 94 00:00:01 EST
-
- OpenGL comes with IRIX 5.x. It supports Entry, XS, XS24, XZ, XL,
- Elan, Extreme, VTX, Reality Engine, and Reality Engine 2 graphics. A
- later version of OpenGL (sometime this year?) will support G, GT,
- GTX, VGX, and VGXT graphics.
-
- ------------------------------
-
- Subject: + -79- What's this about a copyright dispute over virtual desks
- in Indigo Magic?
- Date: 16 Dec 94 00:00:01 EST
-
- + Xerox has a software patent which may cover the virtual desks which
- + are part of Indigo Magic. It may blow over, or SGI may have to remove
- + virtual desks from Indigo Magic or charge for them. IRIX 5.3 and 6.x
- + include licensing code which will turn off virtual desks by 15 May
- + 1995 unless SGI, pending a succesful resolution of the patent dispute,
- + provides a licensing code to its customers. See chapter 1 of the
- + desktop_eoe release notes for details.
-
- ------------------------------
-
- End of sgi/faq/graphics Digest
- ******************************
- --
- The SGI FAQ group sgi-faq@viz.tamu.edu
- Finger us for info on the SGI FAQs, or look in viz.tamu.edu:/pub/sgi.
-
-
-